var req = new XMLHttpRequest();
req.onreadystatechange = function(){
    if(req.readyState == 4){
        console.log(req.responseText);
        var data = JSON.parse(req.responseText);
        console.log(data);
    }
}


req.open('POST','build.php');
req.send();